import { createApp } from 'vue'
import { createPinia } from 'pinia'
import router from './src/router'
import App from './App.vue'

// Vant UI
import { Button, Uploader, ImagePreview, NavBar, Tabbar, TabbarItem, Card, Grid, GridItem, Loading, Toast, Dialog, ActionSheet, Popup, Icon } from 'vant'
import 'vant/lib/index.css'

const app = createApp(App)
const pinia = createPinia()

// 使用插件
app.use(pinia)
app.use(router)

// 注册 Vant 组件
app.use(Button)
app.use(Uploader)
app.use(ImagePreview)
app.use(NavBar)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Card)
app.use(Grid)
app.use(GridItem)
app.use(Loading)
app.use(Toast)
app.use(Dialog)
app.use(ActionSheet)
app.use(Popup)
app.use(Icon)

app.mount('#app')
